package com.hcss.common.util.excel.rull;

import java.util.Map;

import lombok.Getter;
import lombok.Setter;

/**
 * @Title:
 * @Description:
 * @Author:momo
 * @Since:2019年1月28日
 * @Version:1.1.0
 */
@Getter
@Setter
public class RullResult {
	
	private static final String SUCC_MSG = "校验成功";
	
	private Boolean result; // 校验结果
	private String message; // 校验返回信息
	private Map<String, Object> retMap;
	
	private RullResult(Boolean result, String message, Map<String, Object> retMap) {
		this.result = result;
		this.message = message;
		this.retMap = retMap;
	}
	
	public static RullResult getSuccResult() {
		return new RullResult(true, SUCC_MSG, null);
	}
	
	public static RullResult getSuccResult(Map<String, Object> retMap) {
		return new RullResult(true, SUCC_MSG, retMap);
	}
	
	// 校验失败一定要给失败原因
	public static RullResult getFailResult(String msg) {
		return new RullResult(false, msg, null);
	}
	
}

    